#include <string.h>
#include "RobotFactory.h"
#include "RobotFactoryImpl.h"
#include "robots/Acrobat.h"
#include "robots/Malvin.h"
#include "robots/T1000.h"
Robot * RobotFactoryImpl::create(const char* name) {
if (strcmp(name,"Acrobat") == 0) { return new robots::Acrobat;} if (strcmp(name,"Malvin") == 0) { return new robots::Malvin;} if (strcmp(name,"T1000") == 0) { return new robots::T1000;}
}
char * RobotFactoryImpl::getAvailableRobots() {
char names[] = ",Acrobat,Malvin,T1000";
char *retnames = new char[strlen(names)+1];
strcpy(retnames,names);
return retnames;
}
